Peripheral devices such as non-volatile storage devices often have a need for providing device parameters that pertain to the device. For example, when a peripheral device is initially attached to a host (e.g., computer or other device) the host may request device parameters. As a particular example, when a USB device is initially attached to a host computer system and powered-on, the host will request the USB device for device parameters during an enumeration process.
The USB device reports its device parameters to the host using USB descriptors, which are data structures that describe information such as what the device is, what vendor makes the device, and what version of the USB protocol the device supports. Examples of USB descriptor types include device descriptors, string descriptors, configuration descriptors, interface descriptors, and endpoint descriptors.
Device descriptors include general information about the USB device such as a vendor identifier (VID), a product identifier (PID), and a device release number. The VID is a value that uniquely identifies the vendor of the USB device. The PID is a value that uniquely identifies the particular product of the vendor. The device release number is a binary coded decimal that identifies the device release.
String descriptors, if used, describe the manufacturer, the product, and the device's serial number. The USB device may include string descriptors in multiple languages. The host is allowed to specify the desired language of strings returned by the USB device. Thus, the host can display information from the string descriptors to the user in the desired language.
The configuration descriptors include information about a specific device configuration, the interface descriptors describe a specific interface within a configuration, and the endpoint descriptors describe endpoints used for an interface.
Based on the USB descriptors, the host determines a suitable a device driver for the USB device and establishes a communication channel with the USB device. Further details of USB enumeration are available in the Universal Serial Bus Specification, Revision 2.0, Apr. 27, 2000, which is hereby incorporated by reference in its entirety.
USB descriptors are an example of one type of device parameters. Another example of device parameters are those used to offset the effect of semiconductor process variations. For example, a USB device has components whose characteristics are affected by process variation. The USB device may have a register for storing “trim” bits that are used to compensate for the process variation. As a particular example, the resistance of a USB component can be adjusted based on the trim bits.
In order to be able to provide the device parameters to a host, or to use the parameters itself, the device needs to store these device parameters. Devices typically have a small amount of storage such as ROM available. However, because the device parameters may take up a relatively large space, as well as other reasons, storing the device parameters in a portion of ROM that will be used for other purposes may not be desirable. Another option is to add storage such as an EEPROM to store device parameters. However, adding an EEPROM to a device adds considerable expense.